package ar.edu.unrn.lia.dao.impl;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.inject.Named;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

import ar.edu.unrn.lia.dao.ReciboDAO;
import ar.edu.unrn.lia.generic.GenericDaoJpaImpl;
import ar.edu.unrn.lia.model.Recibo;

@Named("reciboDAO")
public class ReciboDAOImpl extends GenericDaoJpaImpl<Recibo, Long> implements
		ReciboDAO, Serializable {

	public Predicate[] getSearchPredicates(Root<Recibo> root,
			Map<String, String> filters) {

		CriteriaBuilder builder = this.entityManager.getCriteriaBuilder();
		List<Predicate> predicatesList = new ArrayList<Predicate>();
		root.alias("entity");

		return predicatesList.toArray(new Predicate[predicatesList.size()]);
	}

}